package com.ruoyi.teaching.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.teaching.mapper.RestaurantMapper;
import com.ruoyi.teaching.domain.Restaurant;
import com.ruoyi.teaching.service.IRestaurantService;

/**
 * 窗口信息Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-05-08
 */
@Service
public class RestaurantServiceImpl implements IRestaurantService 
{
    @Autowired
    private RestaurantMapper restaurantMapper;

    /**
     * 查询窗口信息
     * 
     * @param rName 窗口信息主键
     * @return 窗口信息
     */
    @Override
    public Restaurant selectRestaurantByRName(String rName)
    {
        return restaurantMapper.selectRestaurantByRName(rName);
    }

    /**
     * 查询窗口信息列表
     * 
     * @param restaurant 窗口信息
     * @return 窗口信息
     */
    @Override
    public List<Restaurant> selectRestaurantList(Restaurant restaurant)
    {
        return restaurantMapper.selectRestaurantList(restaurant);
    }

    /**
     * 新增窗口信息
     * 
     * @param restaurant 窗口信息
     * @return 结果
     */
    @Override
    public int insertRestaurant(Restaurant restaurant)
    {
        return restaurantMapper.insertRestaurant(restaurant);
    }

    /**
     * 修改窗口信息
     * 
     * @param restaurant 窗口信息
     * @return 结果
     */
    @Override
    public int updateRestaurant(Restaurant restaurant)
    {
        return restaurantMapper.updateRestaurant(restaurant);
    }

    /**
     * 批量删除窗口信息
     * 
     * @param rNames 需要删除的窗口信息主键
     * @return 结果
     */
    @Override
    public int deleteRestaurantByRNames(String[] rNames)
    {
        return restaurantMapper.deleteRestaurantByRNames(rNames);
    }

    /**
     * 删除窗口信息信息
     * 
     * @param rName 窗口信息主键
     * @return 结果
     */
    @Override
    public int deleteRestaurantByRName(String rName)
    {
        return restaurantMapper.deleteRestaurantByRName(rName);
    }
}
